home *** CD-ROM | disk | FTP | other *** search
/ Mean Girls Press Kit / Mean Girls Press Kit.iso / mac / Movie.dxr / Scripts_29_button_scrollSpritesDOWN.ls < prev    next >
Encoding:
Text File  |  2004-04-06  |  1.0 KB  |  26 lines

  1. property spriteNum, mySprite, endLocV, startSpriteChan, endSpriteChan, incrementAmount
  2.  
  3. on getPropertyDescriptionList
  4.   description = [#endLocV: [#comment: "Bottom of the last visible menu item.", #default: 0, #format: #integer], #startSpriteChan: [#comment: "First channel of sprites to scroll", #default: 0, #format: #integer], #endSpriteChan: [#comment: "Last channel of sprites to scoll", #default: 0, #format: #integer], #incrementAmount: [#comment: "Amount to increment when pressed (Height of mask)", #default: 0, #format: #integer]]
  5.   return description
  6. end
  7.  
  8. on enterFrame me
  9.   mySprite = sprite(spriteNum)
  10.   if rollover(mySprite) then
  11.     if sprite(endSpriteChan).bottom > endLocV then
  12.       repeat with i = startSpriteChan to endSpriteChan
  13.         sprite(i).locV = sprite(i).locV - 3
  14.       end repeat
  15.     end if
  16.   end if
  17. end
  18.  
  19. on mouseDown me
  20.   if sprite(endSpriteChan).bottom > (endLocV + incrementAmount) then
  21.     repeat with i = startSpriteChan to endSpriteChan
  22.       sprite(i).locV = sprite(i).locV - incrementAmount
  23.     end repeat
  24.   end if
  25. end
  26.